{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport classnames from 'classnames';\nimport CSSMotion from 'rc-motion';\nimport Portal from '@rc-component/portal';\nimport { MIN_SCALE, MAX_SCALE } from \"./previewConfig\";\nvar Operations = function Operations(props) {\n  var _countRender;\n  var visible = props.visible,\n    maskTransitionName = props.maskTransitionName,\n    getContainer = props.getContainer,\n    prefixCls = props.prefixCls,\n    rootClassName = props.rootClassName,\n    icons = props.icons,\n    countRender = props.countRender,\n    showSwitch = props.showSwitch,\n    showProgress = props.showProgress,\n    current = props.current,\n    count = props.count,\n    scale = props.scale,\n    onSwitchLeft = props.onSwitchLeft,\n    onSwitchRight = props.onSwitchRight,\n    onClose = props.onClose,\n    onZoomIn = props.onZoomIn,\n    onZoomOut = props.onZoomOut,\n    onRotateRight = props.onRotateRight,\n    onRotateLeft = props.onRotateLeft;\n  var rotateLeft = icons.rotateLeft,\n    rotateRight = icons.rotateRight,\n    zoomIn = icons.zoomIn,\n    zoomOut = icons.zoomOut,\n    close = icons.close,\n    left = icons.left,\n    right = icons.right;\n  var toolClassName = \"\".concat(prefixCls, \"-operations-operation\");\n  var iconClassName = \"\".concat(prefixCls, \"-operations-icon\");\n  var tools = [{\n    icon: close,\n    onClick: onClose,\n    type: 'close'\n  }, {\n    icon: zoomIn,\n    onClick: onZoomIn,\n    type: 'zoomIn',\n    disabled: scale === MAX_SCALE\n  }, {\n    icon: zoomOut,\n    onClick: onZoomOut,\n    type: 'zoomOut',\n    disabled: scale === MIN_SCALE\n  }, {\n    icon: rotateRight,\n    onClick: onRotateRight,\n    type: 'rotateRight'\n  }, {\n    icon: rotateLeft,\n    onClick: onRotateLeft,\n    type: 'rotateLeft'\n  }];\n  var operations = /*#__PURE__*/React.createElement(React.Fragment, null, showSwitch && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n    className: classnames(\"\".concat(prefixCls, \"-switch-left\"), _defineProperty({}, \"\".concat(prefixCls, \"-switch-left-disabled\"), current === 0)),\n    onClick: onSwitchLeft\n  }, left), /*#__PURE__*/React.createElement(\"div\", {\n    className: classnames(\"\".concat(prefixCls, \"-switch-right\"), _defineProperty({}, \"\".concat(prefixCls, \"-switch-right-disabled\"), current === count - 1)),\n    onClick: onSwitchRight\n  }, right)), /*#__PURE__*/React.createElement(\"ul\", {\n    className: \"\".concat(prefixCls, \"-operations\")\n  }, showProgress && /*#__PURE__*/React.createElement(\"li\", {\n    className: \"\".concat(prefixCls, \"-operations-progress\")\n  }, (_countRender = countRender === null || countRender === void 0 ? void 0 : countRender(current + 1, count)) !== null && _countRender !== void 0 ? _countRender : \"\".concat(current + 1, \" / \").concat(count)), tools.map(function (_ref) {\n    var _classnames3;\n    var icon = _ref.icon,\n      onClick = _ref.onClick,\n      type = _ref.type,\n      disabled = _ref.disabled;\n    return /*#__PURE__*/React.createElement(\"li\", {\n      className: classnames(toolClassName, (_classnames3 = {}, _defineProperty(_classnames3, \"\".concat(prefixCls, \"-operations-operation-\").concat(type), true), _defineProperty(_classnames3, \"\".concat(prefixCls, \"-operations-operation-disabled\"), !!disabled), _classnames3)),\n      onClick: onClick,\n      key: type\n    }, /*#__PURE__*/React.isValidElement(icon) ? /*#__PURE__*/React.cloneElement(icon, {\n      className: iconClassName\n    }) : icon);\n  })));\n  return /*#__PURE__*/React.createElement(CSSMotion, {\n    visible: visible,\n    motionName: maskTransitionName\n  }, function (_ref2) {\n    var className = _ref2.className,\n      style = _ref2.style;\n    return /*#__PURE__*/React.createElement(Portal, {\n      open: true,\n      getContainer: getContainer !== null && getContainer !== void 0 ? getContainer : document.body\n    }, /*#__PURE__*/React.createElement(\"div\", {\n      className: classnames(\"\".concat(prefixCls, \"-operations-wrapper\"), className, rootClassName),\n      style: style\n    }, operations));\n  });\n};\nexport default Operations;","map":{"version":3,"names":["_defineProperty","React","classnames","CSSMotion","Portal","MIN_SCALE","MAX_SCALE","Operations","props","_countRender","visible","maskTransitionName","getContainer","prefixCls","rootClassName","icons","countRender","showSwitch","showProgress","current","count","scale","onSwitchLeft","onSwitchRight","onClose","onZoomIn","onZoomOut","onRotateRight","onRotateLeft","rotateLeft","rotateRight","zoomIn","zoomOut","close","left","right","toolClassName","concat","iconClassName","tools","icon","onClick","type","disabled","operations","createElement","Fragment","className","map","_ref","_classnames3","key","isValidElement","cloneElement","motionName","_ref2","style","open","document","body"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/rc-image/es/Operations.js"],"sourcesContent":["import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport classnames from 'classnames';\nimport CSSMotion from 'rc-motion';\nimport Portal from '@rc-component/portal';\nimport { MIN_SCALE, MAX_SCALE } from \"./previewConfig\";\n\nvar Operations = function Operations(props) {\n  var _countRender;\n\n  var visible = props.visible,\n      maskTransitionName = props.maskTransitionName,\n      getContainer = props.getContainer,\n      prefixCls = props.prefixCls,\n      rootClassName = props.rootClassName,\n      icons = props.icons,\n      countRender = props.countRender,\n      showSwitch = props.showSwitch,\n      showProgress = props.showProgress,\n      current = props.current,\n      count = props.count,\n      scale = props.scale,\n      onSwitchLeft = props.onSwitchLeft,\n      onSwitchRight = props.onSwitchRight,\n      onClose = props.onClose,\n      onZoomIn = props.onZoomIn,\n      onZoomOut = props.onZoomOut,\n      onRotateRight = props.onRotateRight,\n      onRotateLeft = props.onRotateLeft;\n  var rotateLeft = icons.rotateLeft,\n      rotateRight = icons.rotateRight,\n      zoomIn = icons.zoomIn,\n      zoomOut = icons.zoomOut,\n      close = icons.close,\n      left = icons.left,\n      right = icons.right;\n  var toolClassName = \"\".concat(prefixCls, \"-operations-operation\");\n  var iconClassName = \"\".concat(prefixCls, \"-operations-icon\");\n  var tools = [{\n    icon: close,\n    onClick: onClose,\n    type: 'close'\n  }, {\n    icon: zoomIn,\n    onClick: onZoomIn,\n    type: 'zoomIn',\n    disabled: scale === MAX_SCALE\n  }, {\n    icon: zoomOut,\n    onClick: onZoomOut,\n    type: 'zoomOut',\n    disabled: scale === MIN_SCALE\n  }, {\n    icon: rotateRight,\n    onClick: onRotateRight,\n    type: 'rotateRight'\n  }, {\n    icon: rotateLeft,\n    onClick: onRotateLeft,\n    type: 'rotateLeft'\n  }];\n  var operations = /*#__PURE__*/React.createElement(React.Fragment, null, showSwitch && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n    className: classnames(\"\".concat(prefixCls, \"-switch-left\"), _defineProperty({}, \"\".concat(prefixCls, \"-switch-left-disabled\"), current === 0)),\n    onClick: onSwitchLeft\n  }, left), /*#__PURE__*/React.createElement(\"div\", {\n    className: classnames(\"\".concat(prefixCls, \"-switch-right\"), _defineProperty({}, \"\".concat(prefixCls, \"-switch-right-disabled\"), current === count - 1)),\n    onClick: onSwitchRight\n  }, right)), /*#__PURE__*/React.createElement(\"ul\", {\n    className: \"\".concat(prefixCls, \"-operations\")\n  }, showProgress && /*#__PURE__*/React.createElement(\"li\", {\n    className: \"\".concat(prefixCls, \"-operations-progress\")\n  }, (_countRender = countRender === null || countRender === void 0 ? void 0 : countRender(current + 1, count)) !== null && _countRender !== void 0 ? _countRender : \"\".concat(current + 1, \" / \").concat(count)), tools.map(function (_ref) {\n    var _classnames3;\n\n    var icon = _ref.icon,\n        onClick = _ref.onClick,\n        type = _ref.type,\n        disabled = _ref.disabled;\n    return /*#__PURE__*/React.createElement(\"li\", {\n      className: classnames(toolClassName, (_classnames3 = {}, _defineProperty(_classnames3, \"\".concat(prefixCls, \"-operations-operation-\").concat(type), true), _defineProperty(_classnames3, \"\".concat(prefixCls, \"-operations-operation-disabled\"), !!disabled), _classnames3)),\n      onClick: onClick,\n      key: type\n    }, /*#__PURE__*/React.isValidElement(icon) ? /*#__PURE__*/React.cloneElement(icon, {\n      className: iconClassName\n    }) : icon);\n  })));\n  return /*#__PURE__*/React.createElement(CSSMotion, {\n    visible: visible,\n    motionName: maskTransitionName\n  }, function (_ref2) {\n    var className = _ref2.className,\n        style = _ref2.style;\n    return /*#__PURE__*/React.createElement(Portal, {\n      open: true,\n      getContainer: getContainer !== null && getContainer !== void 0 ? getContainer : document.body\n    }, /*#__PURE__*/React.createElement(\"div\", {\n      className: classnames(\"\".concat(prefixCls, \"-operations-wrapper\"), className, rootClassName),\n      style: style\n    }, operations));\n  });\n};\n\nexport default Operations;"],"mappings":"AAAA,OAAOA,eAAe,MAAM,2CAA2C;AACvE,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,SAAS,MAAM,WAAW;AACjC,OAAOC,MAAM,MAAM,sBAAsB;AACzC,SAASC,SAAS,EAAEC,SAAS,QAAQ,iBAAiB;AAEtD,IAAIC,UAAU,GAAG,SAASA,UAAU,CAACC,KAAK,EAAE;EAC1C,IAAIC,YAAY;EAEhB,IAAIC,OAAO,GAAGF,KAAK,CAACE,OAAO;IACvBC,kBAAkB,GAAGH,KAAK,CAACG,kBAAkB;IAC7CC,YAAY,GAAGJ,KAAK,CAACI,YAAY;IACjCC,SAAS,GAAGL,KAAK,CAACK,SAAS;IAC3BC,aAAa,GAAGN,KAAK,CAACM,aAAa;IACnCC,KAAK,GAAGP,KAAK,CAACO,KAAK;IACnBC,WAAW,GAAGR,KAAK,CAACQ,WAAW;IAC/BC,UAAU,GAAGT,KAAK,CAACS,UAAU;IAC7BC,YAAY,GAAGV,KAAK,CAACU,YAAY;IACjCC,OAAO,GAAGX,KAAK,CAACW,OAAO;IACvBC,KAAK,GAAGZ,KAAK,CAACY,KAAK;IACnBC,KAAK,GAAGb,KAAK,CAACa,KAAK;IACnBC,YAAY,GAAGd,KAAK,CAACc,YAAY;IACjCC,aAAa,GAAGf,KAAK,CAACe,aAAa;IACnCC,OAAO,GAAGhB,KAAK,CAACgB,OAAO;IACvBC,QAAQ,GAAGjB,KAAK,CAACiB,QAAQ;IACzBC,SAAS,GAAGlB,KAAK,CAACkB,SAAS;IAC3BC,aAAa,GA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